package cn.funnyxb.tools.appFrame.dataStructure;

import android.util.Log;
import java.util.LinkedList;

public class MessageCache<E>
{
  private LinkedList<E> msgs = new LinkedList();

  public void clearCaches()
  {
    this.msgs.clear();
  }

  public E getLatestMsg()
  {
    if (!(this.msgs.isEmpty()));
    for (Object localObject = this.msgs.getLast(); ; localObject = null)
      return localObject;
  }

  public E popFirstMsg()
  {
    if (this.msgs.isEmpty());
    Object localObject1;
    for (Object localObject2 = null; ; localObject2 = localObject1)
    {
      return localObject2;
      localObject1 = this.msgs.getFirst();
      this.msgs.removeFirst();
    }
  }

  public E popLatestMsg()
  {
    Object localObject2;
    if (!(this.msgs.isEmpty()))
    {
      localObject2 = this.msgs.getLast();
      this.msgs.clear();
    }
    for (Object localObject1 = localObject2; ; localObject1 = null)
      return localObject1;
  }

  public void putMsg(E paramE)
  {
    this.msgs.add(paramE);
    Log.i("messagechche", paramE.toString());
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.tools.appFrame.dataStructure.MessageCache
 * JD-Core Version:    0.5.3
 */